package com.demo.pay;


import com.demo.util.Utils;
import com.demo.AppletConstant;

import java.util.HashMap;
import java.util.Map;


/**
 * 申请解约
 *
 */
public class ContractRelieve {
	public static void main(String[] args) {
		
		//planId
		String planId="11495f9************************79491";
		
		//调用接口地址
		String url = "https://open.95516.com/open/access/1.0/contract.relieve";
		
		//拼装参数Map
		Map<String, String> params = new HashMap<String, String>(0);
		params.put("appId", AppletConstant.APP_ID);
		params.put("accessToken", AppletConstant.accessToken);
		params.put("openId", AppletConstant.openId);
		params.put("backendToken", AppletConstant.backendToken);
		
		//委托免密支付签约成功后由云闪付返回的委托免密支付协议id
		params.put("contractId", "86525632486954");
		
		//协议模板id，由云闪付录入模板并分配给接入方
		params.put("planId", planId);
		
		//商户请求签约时传入的签约协议号，由商户侧生产且须唯一
		params.put("contractCode", "696722484692728");
		
		//发送请求
		String resultStr = Utils.sendPostGson(url, params);
		
		System.out.println("-------申请解约:"+resultStr+"---------");
	}
	
}
